package com.jhgsys.internal.sypq.service;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jhgsys.internal.sypq.entity.AttachmentFile;
import com.jhgsys.internal.sypq.entity.ModelShip;
import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jhgsys.internal.sypq.entity.ModelShipProcess;
import com.jhgsys.internal.sypq.entity.ModelShipTest;
import com.jhgsys.internal.sypq.params.FileParams;
import com.jhgsys.internal.sypq.params.OutFinishParams;
import com.jhgsys.internal.sypq.params.ShipModelProcParams;
import com.jhgsys.internal.sypq.params.WechatModelParams;
import com.jhgsys.internal.sypq.vo.ModelShipProcsVO;
import com.jhgsys.internal.sypq.vo.ProjectVO;
import com.jhgsys.internal.sypq.vo.WechatShipModelVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 船模 Service接口
 *
 * @author ganjun
 * @date 2024-11-13 19:03:49
 */
public interface IModelShipService extends IService<ModelShip> {
    /**
     * 查询（分页）
     * @author ganjun
     * @date 2024-11-13 19:03:49
     * @param request QueryRequest
     * @param modelShip modelShip
     * @return IPage<ModelShip>
     */
    IPage<ModelShip> findModelShipPage(QueryRequest request, String demondFinishTime, String name, String statusSearch, String shipCode);

    /**
     * 导出
     * @author ganjun
     * @date 2024-11-13 19:03:49
     * @param request QueryRequest
     * @return IPage<ModelShip>
     */
    List<ModelShip> export(QueryRequest request, String demondFinishTime, String name, String statusSearch, String shipCode);

    /**
     * 查询（所有）
     * @author ganjun
     * @date 2024-11-13 19:03:49
     * @param modelShip modelShip
     * @return List<ModelShip>
     */
    List<ModelShip> findModelShipList(ModelShip modelShip);

    /**
    * 根据ID查询
    * @author ganjun
    * @date 2024-11-13 19:03:49
    * @param id
    * @return ModelShip
    */
    ModelShip findModelShipById(String id);

    /**
     * 新增
     * @author ganjun
     * @date 2024-11-13 19:03:49
     * @param modelShip modelShip
     */
    boolean createModelShip(ModelShip modelShip);

    /**
     * 修改
     * @author ganjun
     * @date 2024-11-13 19:03:49
     * @param modelShip modelShip
     */
    boolean updateModelShip(ModelShip modelShip);


    /**
     * 外带ModelShip完成
     * @author ganjun
     * @date 2024-11-13 19:03:49
     * @param OutFinishParams params
     */
    boolean outFinish(OutFinishParams params);


    /**
     * 加工流程开始
     * @author ganjun
     * @date 2024-11-16 23:04:49
     * @param ShipModelProcParams params
     */
    void startProc(ShipModelProcParams params);

    /**
     * 上传图纸
     * @param params
     */
    void uploadChart(ShipModelProcParams params);


    /**
     * 下料
     * @param params
     */
    void cutting(ShipModelProcParams params);

    /**
     * 粗切
     * @param params
     */
    void routhCut(ShipModelProcParams params);

    /**
     * 精切
     * @param params
     */
    void fineCut(ShipModelProcParams params);

    /**
     * 修模
     * @param params
     */
    void modRepair(ShipModelProcParams params);

    /**
     * 油漆
     * @param params
     */
    void paint(ShipModelProcParams params);

    /**
     * 完成
     * @param params
     */
    void finish(ShipModelProcParams params);

    /**
     * 逻辑删除
     * @author ganjun
     * @date 2024-11-13 19:03:49
     * @param modelShip modelShip
     * @param modelShipIds modelShipIds
     */
    boolean deleteModelShip(ModelShip modelShip, String modelShipIds);

    /**
    * 物理删除
    * @author ganjun
    * @date 2024-11-13 19:03:49
    * @param modelShipIds modelShipIds
    */
    boolean physicallyDeleteModelShip(String modelShipIds);

    @Override
    BaseMapper<ModelShip> getBaseMapper();

    /**
     * 根据船模id获取船模加工流程
     * @param shipId
     * @return
     */
    List<ModelShipProcess> getModelShipProcsByShipId(String shipId);


    List<ModelShipProcsVO> getModelShipProcsVOByShipId(String shipId);

    /**
     * 根据船模id获取船模图纸附件信息
     * @param shipId
     * @return
     */
    List<FileParams> getModelShipAttachsByShipId(String shipId);

    /**
     * 根据船模id获取船模检测信息
     * @param shipId
     * @return
     */
    ModelShipTest getModelShipTestByShipId(String shipId);

    /**
     * 获取项目列表
     * @return
     */
    List<ProjectVO> getProjectList();

    /**
     * 导出船模申请表
     * @param id
     * @param response
     */
    void expApplyForm(String id,  HttpServletResponse response);

    /**
     * 导出船模质量检验表
     * @param id
     * @param response
     */
    void expShipModelCheckForm(String id,  HttpServletResponse response);


    /**
     * 导出船模加工进度及检验表
     * @param id
     * @param response
     */
    void expProcForm(String id,  HttpServletResponse response);


    List<WechatShipModelVO> getShipModelList(WechatModelParams params);

}
